
package com.server;

import com.domain.DoorDevice;
import com.repository.DeviceRepo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class DeviceServer {
 @Resource
    public DeviceRepo deviceRepository;


    public DoorDevice selectName(String Name){
        DoorDevice device=deviceRepository.findByName(Name);
        return device;
    }
    public List<DoorDevice> findAll(){
        return  deviceRepository.findAll();
    }
}

